<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/assets/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/assets/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="/assets/Css/style.css" />
    <script type="text/javascript" src="/assets/Js/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/assets/Js/bootstrap.js"></script>
    <script type="text/javascript" src="/assets/Js/ckform.js"></script>
    <script type="text/javascript" src="/assets/Js/common.js"></script>
    <script type="text/javascript">
    
    	$(document).ready(function(){
    		$("#addmanager").click(function(){
    			window.location.href = "/manager/manager/addmanager";
    		});
    	});
    	
    	function deleteadmin(id){
    		if(confirm("你确定要删除该管理员账号？")){
    			var url = "/manager/manager/delete";
    			$.post(
    					url,
    					{Id:id},
    					function(data){
    						alert("删除成功");
    						window.location.reload();
    						}
    				);
    		}
    		
    	}
    </script>
</head>
<body>
       &nbsp;&nbsp;&nbsp;&nbsp;
    <button type="button" class="btn btn-primary" id="addmanager">添加</button>&nbsp;&nbsp;
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
    	<th><input type="checkbox" id="allcheck">ID</th>
        <th>账号</th>
       	<th>操作</th>
    </tr>
    </thead>
    <tbody>
    	<c:forEach var="a" items="${admin }">
    		<tr>
    			<td>${a.id }</td>
    			<td>${a.account }</td>
    			<td><a href="javascript:;" onclick="deleteadmin(${a.id })">删除</a></td>
    		</tr>
    	</c:forEach>
    
    </tbody>
</table>
<div class="page-turning"></div>
</body>
</html>